AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( 'shared.lua')


function ENT:SetPlayer( ply )
    self.Owner = ply
end

function ENT:GetPlayer( )
    return self.Owner
end

function ENT:SetCreator( creator )
self.Creator = creator
end

function ENT:GetCreator()
return self.Creator
end

-- Serverside init
function ENT:Initialize()
    -- Basic stufff

    self:PhysicsInitBox( Vector( -16, -16, -16 ), Vector(  16,  16,  16 ) )
    self:SetMoveType( MOVETYPE_NONE )
    self:SetSolid( SOLID_BBOX )

    -- Collide
    self:SetCollisionGroup( COLLISION_GROUP_INTERACTIVE )
    self.CollisionGroup = COLLISION_GROUP_INTERACTIVE
    self:SetCollisionBounds( Vector( -16, -16, -16), Vector( 16, 16, 16) )
end

function ENT:OnTakeDamage( dmginfo )
	self.Entity:TakePhysicsDamage( dmginfo )
	if (self.health > 0) then
	self.health = self.health - dmginfo:GetDamage()
	end
	if (self.health < 1) then
		if (self.health > -100000) then
			self:Remove()
		end
	end
end

function ENT:SetMyHealth( ammount )
	self.health = ammount
end

function ENT:GetHealth()
return self.health
end